/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package peticionweb.logica.entidad;

import java.io.Serializable;
import java.util.List;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.OneToMany;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlTransient;

/**
 *
 * @author icardenas
 */
@Entity
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "Cusem1m.findAll", query = "SELECT c FROM Cusem1m c")})
public class Cusem1m implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(nullable = false)
    private Integer idese;
    @Column(length = 45)
    private String anhse;
    @Column(length = 45)
    private String perse;
    @OneToMany(mappedBy = "cusem1m", fetch = FetchType.LAZY)
    private List<Cuipe1d> cuipe1dList;

    public Cusem1m() {
    }

    public Cusem1m(Integer idese) {
        this.idese = idese;
    }

    public Integer getIdese() {
        return idese;
    }

    public void setIdese(Integer idese) {
        this.idese = idese;
    }

    public String getAnhse() {
        return anhse;
    }

    public void setAnhse(String anhse) {
        this.anhse = anhse;
    }

    public String getPerse() {
        return perse;
    }

    public void setPerse(String perse) {
        this.perse = perse;
    }

    @XmlTransient
    public List<Cuipe1d> getCuipe1dList() {
        return cuipe1dList;
    }

    public void setCuipe1dList(List<Cuipe1d> cuipe1dList) {
        this.cuipe1dList = cuipe1dList;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (idese != null ? idese.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Cusem1m)) {
            return false;
        }
        Cusem1m other = (Cusem1m) object;
        if ((this.idese == null && other.idese != null) || (this.idese != null && !this.idese.equals(other.idese))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "peticionweb.logica.entidad.Cusem1m[ idese=" + idese + " ]";
    }
    
}
